﻿package Network
{	
	import flash.utils.IExternalizable;
	import flash.utils.IDataInput;
	import flash.utils.IDataOutput;	
	import flash.net.*;
	
	[Bindable]
	[RemoteClass(alias="FlashServer.DataMessage")]	
	public class DataMessage implements IExternalizable 
	{		
		public var Message: String;  				
		public var Index:int;
		public var Points:int;
		public var DataType: int;
	
		public function DataMessage()
		{
			DataType = 0;
		}
		
		public function readExternal(input:IDataInput):void
		{
			Message = input.readObject() as String;
			Index = input.readInt();
			Points = input.readInt();
			DataType = input.readInt();
		}
		
		public function writeExternal(output:IDataOutput):void
		{			
			output.writeObject(Message);
			output.writeInt(Index);
			output.writeInt(Points);
			output.writeInt(DataType);
		}
	}
}